package com.song.service;

import com.song.model.Order;

import java.util.UUID;

/**
 * @ClassName : MyOrderServiceImpl
 * @Author : 司猫子
 * @Date: 2021/2/26 13:58
 */
public class MyOrderServiceImpl implements OrderService{
    public Order createOrder(Integer userId, String goodsName, Float price, Integer amount) {
        System.out.println("最佳化实践,OrderService服务提供者");
        Order order = new Order();
        order.setUserId(userId);
        order.setGoodsName(goodsName);
        order.setPrice(price);
        order.setAmount(amount);
        order.setOrderId(UUID.randomUUID().toString().replaceAll("-", ""));
        return order;
    }
}
